package com.knowledgepoint.study.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.knowledgepoint.study.model.entity.KnowledgeType;

import java.util.List;

/**
 * 知识点类型 Service 接口
 */
public interface KnowledgeTypeService extends IService<KnowledgeType> {
    
    /**
     * 获取所有启用的知识点类型
     */
    List<KnowledgeType> listEnabled();
    
    /**
     * 检查类型名称是否已存在
     */
    boolean isNameExist(String name, Long excludeId);
    
    /**
     * 分页查询
     */
    <P extends IPage<KnowledgeType>> P page(P page, Wrapper<KnowledgeType> queryWrapper);
}
